import { EntitySchema } from '@mikro-orm/core';

export class TypechoOptions {
  name!: string;
  user: number = 0;
  value?: string;
}

export const TypechoOptionsSchema = new EntitySchema({
  class: TypechoOptions,
  properties: {
    name: { primary: true, type: 'string', length: 32 },
    user: { primary: true, type: 'number', default: 0 },
    value: { type: 'string', columnType: 'text', nullable: true },
  },
});
